﻿/*
 * TiffSampleFormat
 * 
 * Copyright (c) Adam Sida, asida@centrum.cz
 * 
 * All rights reserved.
 */
using System;



namespace Petra.Gis.Geometry.Image.Tiff
{
  public struct TiffPixelFormat
  {
    public readonly int BitsPerPixel;
    //int Mask;

    public TiffPixelFormat(int bpp)
    {
      if (!(bpp > 0 || bpp < 96))
        throw new ArgumentException("invalid value for BitsPerPixel");

      BitsPerPixel = bpp;

    }

    public static bool operator ==(TiffPixelFormat left, TiffPixelFormat right)
    {
      if (left.GetType() == right.GetType())
        return true;
      else
        return false;
    }


    public static bool operator !=(TiffPixelFormat left, TiffPixelFormat right)
    {
      if (left.GetType() != right.GetType())
        return true;
      else
        return false;
    }

    public override int GetHashCode()
    {
      return base.GetHashCode();
    }

    public override bool Equals(object obj)
    {
      return base.Equals(obj);
    }

    public override string ToString()
    {
      return base.ToString();
    }

  }
}
